import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from "@angular/forms";
import { OnetomanyRoutingModule } from './onetomany-routing.module';
import { OnetomanyDetailComponent } from './detail/detail.component';
import { OnetomanyEditComponent } from './edit/edit.component';
import { OnetomanyStepbarComponent } from './stepbar/stepbar.component';
import { OnetomanyCheckComponent } from './check/check.component';
import { EnclosureComponent } from './enclosure/enclosure.component';
import { AppPaginationModule } from "../../widgets/pagination/pagination.module";
import { FileUploadModule } from 'ng2-file-upload';
import { CustomFormsModule } from 'ng2-validation';
import { CheckboxModule } from 'primeng/primeng';
import * as flatpickr from 'flatpickr';
import { FlatpickrModule, FLATPICKR } from '../../../assets/angularx-flatpickr';
import { OnetomanyCheckModalComponent } from './modal/check/check.component';
export function flatpickrFactory() {
  return flatpickr;
}
@NgModule({
  imports: [
    CommonModule,
    OnetomanyRoutingModule,
    FormsModule,
    AppPaginationModule,
    FileUploadModule,
    CustomFormsModule,
    FlatpickrModule.forRoot({
      provide: FLATPICKR,
      useFactory: flatpickrFactory
    })
  ],
  entryComponents: [OnetomanyCheckModalComponent],//动态加载组件
  declarations: [OnetomanyDetailComponent, OnetomanyEditComponent, OnetomanyStepbarComponent, OnetomanyCheckComponent, EnclosureComponent, OnetomanyCheckModalComponent]
})
export class OnetomanyModule { }
